package com.sooth.common.satoken.config;

import cn.dev33.satoken.fun.strategy.SaHasElementFunction;
import com.sooth.common.satoken.utils.LoginHelper;

import java.util.List;

public class SaHasElementFunctionImpl implements SaHasElementFunction {
    @Override
    public Boolean apply(List<String> permList, String perm) {
        if (LoginHelper.isSuperAdmin()) {
            return true;
        }
        return permList.contains(perm);
    }
}
